#include<iostream>
using namespace std;

bool selectsort(int a[], int len)
{
	if (len == 0 || len < 2)
	{
		return true;
	}
	for (int i = 1; i < len; i++)
	{
		for (int j = i - 1; j >= 0 && a[j] > a[j + 1]; j--)
		{
			int tmp;
			tmp = a[j + 1];
			a[j + 1] = a[j];
			a[j] = tmp;
		}
	}
	return true;
}
int main()
{
	int a[10] = { 2,3,5,11,43,75,65,82,9,10 };
	selectsort(a, 10);
	for (int i = 0; i < 10; i++)
	{
		cout << a[i] << " ";
	}
	return 0;
}